<template>
  <div class="search-artist">
	 <artist-list :artists="artists"></artist-list>
  </div>
</template>

<script>
import {_Search} from "network/search.js"
import ArtistList from "@/components/content/artist-list/artist-list"
import {sreach} from '@/mixin/components/sreach'

export default {
  name:'SearchArtist',
  components:{ArtistList},
  mixins:[sreach],
  data(){
    return{
      searchType:100,
	  artists:[],
	  artistCount:0
    }
  },
  created(){
	  // this.getList();
  },
  methods:{
     getList(){
     	   if (this.keywords == "") return;
     	   this.artists = [];
     	  _Search(this.keywords, this.searchType).then(res=>{
			    // console.log(res);
     	  		this.artists=res.data.result.artists;
     	  		this.artistCount=res.data.result.artists.length;
     	  		this.$emit('setData',this.artistCount,"歌手")
     	  })
     },
  },

}
</script>

<style lang="less" scoped>

</style>
